#include <stdio.h>

int sum(int left,int right)
{
    int end = 0;
    for(int i = left;i <= right;i++ )
    {
        end += i;
    }
    return end;
}

int main()
{
    int s = sum(1,100);
    printf("[1~100]->%d\n",s);
    return 0;
}
